<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>添加文档</title>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/skin/admin/css/base.css">
<script language="javascript">
function callSubMethod(){
  var str=window.showModalDialog("{:U('Upload/index')}","","dialogWidth=400px;dialogHeight=200px;toolbar=no;scroll=yes;");
  document.getElementById('cover').value=str;

}
</script>
  <link rel="stylesheet" href="__ROOT__/kindeditor/themes/default/default.css" />
  <link rel="stylesheet" href="__ROOT__/kindeditor/plugins/code/prettify.css" />
  <script charset="utf-8" src="__ROOT__/kindeditor/kindeditor.js"></script>
  <script charset="utf-8" src="__ROOT__/kindeditor/lang/zh_CN.js"></script>
  <script charset="utf-8" src="__ROOT__/kindeditor/plugins/code/prettify.js"></script>
  <script>
    KindEditor.ready(function(K) {
               K.create('textarea[name="content"]', {
          allowFileManager : true

        });
  
  
    });
  </script>
    <script type="text/javascript" language="javascript"
  src="__TMPL__skin/js/jquery.js"></script>
<script>
  $(document).ready(function () {
          $("#province").change(function(){
              var id = $(this).val();
               if(id == 0){
                   $("#city").html(""); 
                 $("#city").append(' <option value="0" >全部城市</option>');
                return false;   
              }
               var url = "{:U('Ads/getcity',array('id'=>'"+id+"'))}";
                //alert(url);
               $.get(url,function(data){
               
                   $("#city").html(""); 
                 for(var i=0;i<data.length;i++){
                   
                  
                     $("#city").append(' <option value="'+data[i].id+'" >'+data[i].city+'</option>');
                 }
                 },"json");
            
            });
});
    
</script>
</head>
<body leftmargin="8" topmargin="8" background='__PUBLIC__/skin/images/allbg.gif'>

<!--  快速转换位置按钮  -->
<table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D1DDAA" align="center">
<tr>
 <td height="26" background="__PUBLIC__/skin/images/newlinebg3.gif">
  <table width="98%" border="0" cellspacing="0" cellpadding="0">
  <tr>
  <td align="center">编辑信息</td>
 </tr>
</table>
</td>
</tr>
</table>
  
<!--  内容列表   -->
<form name="form2" action="{:U('edit',array('id'=>$li['id']))}" method="post" >
  <table width="98%" border="0" align="center" cellspacing="1" bgcolor="#D1DDAA">
  <tr>
    <td width="100" height="28" bgcolor="#FFFFFF">标题：</td>
    <td bgcolor="#FFFFFF"><input name="title" type="text" id="title" style="height:22px; width:400px;" value="{$li['title']}"> </td>
    </tr>
    <tr>
    <td width="100" height="28" bgcolor="#FFFFFF">所在城市：</td>
    <td bgcolor="#FFFFFF">
      <select name="province" id="province">
      <volist name="province" id="v">
        <option value="{$v['id']}" <if condition="$v2['id'] eq $city['cid']">selected</if> >{$v['province']}</option>
      </volist>
      </select>
      <select name="city" id="city">
      <volist  name="citys" id="vo2" >
        <option value="{$vo2['id']}" <if condition="$vo2['id'] eq $city['cityid']">selected</if> >{$vo2['city']}</option>
      </volist>
    </select></td>
    </tr>
  <tr>
    <tr>
    <td width="100" height="28" bgcolor="#FFFFFF">所在分类：</td>
    <td bgcolor="#FFFFFF"><select name="cid" id="cid">
  <volist  name="list" id="vo" >
       <option value="{$vo['id']}" <if condition="$vo['id'] eq $li['cid']">selected</if> >{$vo['name']}</option>
      </volist>
    </select></td>
    </tr>
      <tr>
    <td width="100" height="28" bgcolor="#FFFFFF">关键字：</td>
    <td bgcolor="#FFFFFF"><input name="keywords" type="text" id="keywords" style="height:22px; width:400px;" value="{$li['keywords']}"> </td>
    </tr>
      <tr>
    <td width="100" height="28" bgcolor="#FFFFFF">删除密码：</td>
    <td bgcolor="#FFFFFF"><input name="delpass" type="text" id="delpass" style="height:22px; width:400px;" value="{$li['delpass']}"> </td>
    </tr>
      <tr>
    <td width="100" height="28" bgcolor="#FFFFFF">店铺名：</td>
    <td bgcolor="#FFFFFF"><input name="shopname" type="text" id="shopname" style="height:22px; width:400px;" value="{$li['shopname']}"> </td>
    </tr>
      <tr>
    <td width="100" height="28" bgcolor="#FFFFFF">邮箱：</td>
    <td bgcolor="#FFFFFF"><input name="email" type="text" id="email" style="height:22px; width:400px;" value="{$li['email']}"> </td>
    </tr>
          <tr>
    <td width="100" height="28" bgcolor="#FFFFFF">联系人：</td>
    <td bgcolor="#FFFFFF"><input name="contact" type="text" id="contact" style="height:22px; width:400px;" value="{$li['contact']}"> </td>
    </tr>
          <tr>
    <td width="100" height="28" bgcolor="#FFFFFF">联系电话：</td>
    <td bgcolor="#FFFFFF"><input name="phone" type="text" id="phone" style="height:22px; width:400px;" value="{$li['phone']}"> </td>
    </tr>
  <tr>
    <td height="28" bgcolor="#FFFFFF">&nbsp;内容：</td>
    <td bgcolor="#FFFFFF"><textarea name="content" id="content" style="width:100%;height:400px;visibility:hidden;">{$li['content']}</textarea></td>
    </tr>
    <tr>
    <td height="28" bgcolor="#FFFFFF">&nbsp;</td>
    <td bgcolor="#FFFFFF"><input name="submit" type="submit" id="submit" value="发布"></td>
  </tr>
</table>
</form>


<table width='98%'  border='0' cellpadding='1' cellspacing='1' bgcolor='#CBD8AC' align="center" style="margin-top:8px">
  <tr bgcolor='#EEF4EA'>
    <td background='skin/images/wbg.gif' align='center'>&nbsp;</td>
  </tr>
</table>

</body>
</html>